import myaxios from "../MyAxios";
import BASEURL from "../BaseUrl";

const TCHYURL = BASEURL.TCHYURL;
const fleetManagementApi = {
  // 获取车队列表
  getFleetList(params) {
    let url = TCHYURL + "/supplier/fleet/list";
    return myaxios.get(url, params);
  },
  //新增车队
  addFleet(params) {
    let url = TCHYURL + "/supplier/fleet/insert";
    return myaxios.post(url, params);
  },
  //车队详情
  getFleetDetails(params) {
    let url = TCHYURL + "/supplier/fleet/detail";
    return myaxios.get(url, params);
  },
  //修改车队
  updataFleet(params) {
    let url = TCHYURL + "/supplier/fleet/update";
    return myaxios.post(url, params);
  },
  //删除车队
  deleteFleet(params) {
    let url = TCHYURL + "/supplier/fleet/delete";
    return myaxios.get(url, params);
  },
  //车队名称 校验唯一性
  FleetNameAudit(params) {
    let url = TCHYURL + "/supplier/fleet/checkAgain";
    return myaxios.get(url, params);
  },
  //司机加入车队申请
  examineDriver(params) {
    let url = TCHYURL + "/account/fleet/examineDriver";
    return myaxios.post(url, params);
  },
  //司机加入车队申请是否同意
  modifyJoinRecord(params) {
    let url = TCHYURL + "/account/fleet/modifyJoinRecord";
    return myaxios.post(url, params);
  },
  //外部车队列表
  queryExternalFleet(params) {
    let url = TCHYURL + "/supplier/fleet/queryExternalFleet";
    return myaxios.post(url, params);
  },
  //外部车队查询
  queryBindingExternalFleet(params) {
    let url = TCHYURL + "/supplier/fleet/queryBindingExternalFleet";
    return myaxios.get(url, params);
  },
  //外部车队新增
  addExternalFleet(params) {
    let url = TCHYURL + "/supplier/fleet/addExternalFleet";
    return myaxios.get(url, params);
  },
  //外部车队解绑
  delExternalFleet(params) {
    let url = TCHYURL + "/supplier/fleet/delExternalFleet";
    return myaxios.get(url, params);
  },
  //授权车队列表
  queryExternalExamineFleet(params) {
    let url = TCHYURL + "/supplier/fleet/queryExternalExamineFleet";
    return myaxios.post(url, params);
  },
  //授权车队列表审核
  ExternalExamineFleet(params) {
    let url = TCHYURL + "/supplier/fleet/ExternalExamineFleet";
    return myaxios.get(url, params);
  },
};
export default fleetManagementApi;
